using System.Linq;
using UnityEditor;
using UnityEngine;
[CreateAssetMenu(menuName = "Game/Scroll Data/SlotScrollData/SlotScrollData List", fileName = "SlotScrollData List")]
public class SlotScrollDataListSO : ScriptableObject
{
    public SlotScorllDataSO[] slotScrollDatas;
        
#if UNITY_EDITOR
    [ContextMenu("Auto-fill with all SlotScrollData")]
    public void CollectItemData()
    {
        string[] guids = AssetDatabase.FindAssets("t:SlotScorllDataSO");
        slotScrollDatas = guids
                    .Select(guid => AssetDatabase.LoadAssetAtPath<SlotScorllDataSO>(AssetDatabase.GUIDToAssetPath(guid)))
                    .Where(slotScroll => slotScroll != null)
                    .ToArray();
        EditorUtility.SetDirty(this);
        AssetDatabase.SaveAssets();
    }
#endif
}
